//
//  ItemSecondAnotherCell.m
//  Lovelife
//
//  Created by apple on 15/4/27.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "ItemSecondAnotherCell.h"
#import "NightManager.h"
@implementation ItemSecondAnotherCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        self.Img = [[UIImageView alloc]init];
        
        [self addSubview:self.Img];
        
        [_Img release];
        
        self.title = [[BaseLabel alloc]init];
        
        [self addSubview:self.title];
        
        [_title release];
        
        self.age = [[BaseLabel alloc]init];
        
        [self addSubview:self.age];
        
        [_age release];
        
        self.category = [[BaseLabel alloc]init];
        
        [self addSubview:self.category];
        
        [_category release];
        
        self.effect = [[BaseLabel alloc]init];
        
        [self addSubview:self.effect];
        
        [_effect release];
    }

    return self;

}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.Img.frame = CGRectMake(5, 15, self.frame.size.width/3, self.frame.size.height - 20);
    
    self.title.frame = CGRectMake(self.frame.size.width/3 +10, 20, self.frame.size.width/3, 15);
    
    self.category.frame = CGRectMake(self.frame.size.width/3+10, 50, self.frame.size.width/3, 10);

    
    self.age.frame = CGRectMake(self.frame.size.width/3 +10, 70, self.frame.size.width/3+100, 15);
    
    self.effect.frame = CGRectMake(self.frame.size.width/3+10, 100, self.frame.size.width/3+10, 15);


}

-(void)setNightDayModel
{
    [NightManager setBackgroundColorWithCollectionView:self];
    
    [NightManager setLabelColorWithLabel:self.effect];
    
    [NightManager setLabelColorWithLabel:self.age];
    
    [NightManager setLabelColorWithLabel:self.category];
    
    [NightManager setLabelColorWithLabel:self.title];
}

-(void)setLightDayModel
{
    [NightManager setBackgroundColorWithCollectionView:self];
    
    [NightManager setLabelColorWithLabel:self.effect];
    
    [NightManager setLabelColorWithLabel:self.age];
    
    [NightManager setLabelColorWithLabel:self.category];
    
    [NightManager setLabelColorWithLabel:self.title];
    
}

@end
